package main

import "fmt"

// Author : CSR丶WARRIOR
// Time ： 2020/10/12  22:26
// TOOLS : GoLand
// FILENAME : returnValue2.go
// STATEMENT: 函数返回值(多个值)

func getRes(a int, b int) (int, int) {
	sum := a + b
	sub := a - b
	return sum, sub
}

func getRes2(a int, b int) (sum int, sub int) {
	sum = a + b
	sub = a - b
	return
}
func main() {
	r1, r2 := getRes2(15, 9)
	fmt.Println("r1 = ", r1) //r1 =  24
	fmt.Println("r1 = ", r2) //r1 =  6
}
